package com.example.h2databasedemo2.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DemoController {

    @Autowired
    JdbcTemplate myH2JdbcTemplate;

    @GetMapping("/points")
    public Object points() {
        return myH2JdbcTemplate.queryForList("SELECT * FROM `POINT`");
    }
}
